//设计比较两个整数是否相同的方法，兼容全整数类型（byte,short,int,long
public class 方法重载练习 {
    public static void main(String[] args) {
        System.out.println(compare(1,1));
        System.out.println(compare((byte) (1),(byte) (1)));
        System.out.println(compare((short)(1),(short)(1)));
        System.out.println(compare((long)(1),(long)(1)));
    }

    public static boolean compare(byte a, byte b) {
        System.out.println("byte");
        return a == b;
    }

    public static boolean compare(short a, short b) {
        System.out.println("short");
        return a == b;
    }

    public static boolean compare(int a, int b) {
        System.out.println("int");
        return a == b;
    }

    public static boolean compare(long a, long b) {
        System.out.println("long");
        return a == b;

    }
}